<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSuggestionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('suggestions', function (Blueprint $table) {
            $table->increments('id');
            $table->integer("customer_id")->nullable()->comment("用户ID");
            $table->tinyInteger('type')->comment("建议类型： 1-咨询；2-建议；0-其他");
            $table->string("email")->nullable()->comment("邮箱");
            $table->string("mobile")->nullable()->comment("手机");
            $table->string("third_party")->nullable()->comment("其他联系方式");
            $table->text("content")->comment("建议内容");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('suggestions');
    }
}
